<?php
declare (strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Employees extends Model {
    // 设置表名
    protected $name = 'employees';

    // 设置主键
    protected $pk = 'employee_id';

    // 定义与部门的关联关系
    public function department() {
        return $this->belongsTo(Departments::class, 'department_id', 'department_id');
    }
}
